<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>充值中心</title>
    <link rel="stylesheet" href="__PUBLIC__/Home/css/Active/library/r_public.css">
    <link rel="stylesheet" href="__PUBLIC__/Home/css/menu/menu_recharge_center.css">
    <script src="__PUBLIC__/Home/js/Active/library/zepto.js"></script>
    <script src="__PUBLIC__/Home/js/Active/library/flexible.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"> </script>
    <script>
        wx.config({
            // 微信配置
            debug: false,
            appId: "{$signPackage['appId']}",
            timestamp: "{$signPackage['timestamp']}",
            nonceStr: "{$signPackage['nonceStr']}",
            signature: "{$signPackage['signature']}",
            jsApiList: [
                'onMenuShareTimeline',
                'onMenuShareAppMessage',
                'scanQRCode'
                ]
        });

        function a(){
            wx.scanQRCode({
                needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
                scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
                success: function (res) {
                    var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
                    var arr=result.split(",");
                    var psel = document.getElementById("number");
                    psel.value=arr['1'];
                }
            });
        }
    </script>
</head>
<body>
    <p class="title">充值中心</p>
    <nav class="grid-list">
        <li class="grid">
            <a onclick="a()">
                <img src="__PUBLIC__/Home/img/icon_wx_menu_2_smcz.png" alt="">
                <span >扫一扫</span>
            </a>
        </li>
    </nav>
    <input type='text' id='number' />
    <img src="__PUBLIC__/Home/img/c_shuoming.png" style="width:100%">
</body>
</html>